<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Title</title>
</head>
<body>

</body>
<script type="text/javascript">
    var module1 = new Object({
        _count : 0,
        m1 : function (){
            //...
        },
        m2 : function (){
            //...
        }
    });

    var module2 = (function(){

        var _count = 0;
        var m1 = function(){
            //...
        };
        var m2 = function(){
            //...
        };
        return {
            m1 : m1,
            m2 : m2
        };
    })();

    console.log(module1._count);
    console.log(module2._count);

    var math = require('math');
</script>
</html>